package com.margo.project.common;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.margo.project.base.result.Result;
import com.margo.project.base.result.ResultUtils;

@ControllerAdvice
@ResponseBody
public class ExceptionHandlerAdvice {
	@ExceptionHandler(Exception.class)
	public Result handleException(Exception e) {
		e.printStackTrace();
		return ResultUtils.errorWithMeg("后台服务报错");
	}
}
